package group2.model;

/**
 * @author 李显星
 * @date 2020/8/17 22:13
 **/
public class OrderDetail {

    private String orderDetailId;  //订单详情编号
    private String orderId;
    private int bookId;
    private int num; //数量
    private double price;

    //关联实体
    private Book book;

    public OrderDetail() {
    }

    public OrderDetail(String orderDetailId, String orderId, int bookId, int num, double price) {
        this.orderDetailId = orderDetailId;
        this.orderId = orderId;
        this.bookId = bookId;
        this.num = num;
        this.price = price;
    }

    public String getOrderDetailId() {
        return orderDetailId;
    }

    public void setOrderDetailId(String orderDetailId) {
        this.orderDetailId = orderDetailId;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public int getBookId() {
        return bookId;
    }

    public void setBookId(int bookId) {
        this.bookId = bookId;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public Book getBook() {
        return book;
    }

    public void setBook(Book book) {
        this.book = book;
    }


    @Override
    public String toString() {
        return "OrderDetail{" +
                "orderId='" + orderId + '\'' +
                ", bookId=" + bookId +
                ", num=" + num +
                ", price=" + price +
                '}';
    }
}
